Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class com.pacist.diamonds.Shadow

java.lang.Object
  |
  +--com.pacist.diamonds.Shadow

public class Shadow
extends java.lang.Object
Utility functions for drawing 3D shadows.


Method Summary
static void draw3DOval(java.awt.Graphics g, int x, int y, int width, int height, boolean raised)
          Draws a 3D Oval on the specified graphics context, at the specified X, Y co-ordinates.
static void draw3DPolygon(java.awt.Graphics g, java.awt.Polygon p, boolean raised)
          Draws a 3D Polygon on the specified graphics context, using the specified polygon points.
static void draw3DRoundRect(java.awt.Graphics g, int x, int y, int width, int height, int arcWidth, int arcHeight, boolean raised)
          Draws a 3D Rectangle with rounded edges on the specified graphics context, at the specified X, Y co-ordinates.
static void fill3DOval(java.awt.Graphics g, int x, int y, int width, int height, boolean raised)
          Draws a filled 3D Oval on the specified graphics context, at the specified X, Y co-ordinates.
static void fill3DPolygon(java.awt.Graphics g, java.awt.Polygon p, boolean raised)
          Draws a filled 3D Polygon on the specified graphics context, using the specified polygon points.
static void fill3DRoundRect(java.awt.Graphics g, int x, int y, int width, int height, int arcWidth, int arcHeight, boolean raised)
          Draws a filled 3D Rectangle with rounded edges on the specified graphics context, at the specified X, Y co-ordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Method Detail

draw3DRoundRect

public static void draw3DRoundRect(java.awt.Graphics g,
                                   int x,
                                   int y,
                                   int width,
                                   int height,
                                   int arcWidth,
                                   int arcHeight,
                                   boolean raised)
Draws a 3D Rectangle with rounded edges on the specified graphics context, at the specified X, Y co-ordinates.
The roundness of the edges may be altered with the arcWidth and arcHeight parameters. The raised variable determines whether the shadow is raised or sunken.
Parameters:
g - the graphics context.
x - the x co-ordinate.
y - the y co-ordinate.
width - width of rectangle.
height - height of rectangle.
arcWidth - width of arc at the corners.
arcHeight - height of arc at the corners.
raised - true if the rectangle should be raised; false otherwise.

fill3DRoundRect

public static void fill3DRoundRect(java.awt.Graphics g,
                                   int x,
                                   int y,
                                   int width,
                                   int height,
                                   int arcWidth,
                                   int arcHeight,
                                   boolean raised)
Draws a filled 3D Rectangle with rounded edges on the specified graphics context, at the specified X, Y co-ordinates.
The roundness of the edges may be altered with the arcWidth and arcHeight parameters. The raised variable determines whether the shadow is raised or sunken.
Parameters:
g - the graphics context.
x - the x co-ordinate.
y - the y co-ordinate.
width - width of rectangle.
height - height of rectangle.
arcWidth - width of arc at the corners.
arcHeight - height of arc at the corners.
raised - true if the rectangle should be raised; false otherwise.

draw3DOval

public static void draw3DOval(java.awt.Graphics g,
                              int x,
                              int y,
                              int width,
                              int height,
                              boolean raised)
Draws a 3D Oval on the specified graphics context, at the specified X, Y co-ordinates.
The raised variable determines whether the shadow is raised or sunken.
Parameters:
g - the graphics context.
x - the x co-ordinate.
y - the y co-ordinate.
width - width of oval.
height - height of oval.
raised - true if the oval should be raised; false otherwise.

fill3DOval

public static void fill3DOval(java.awt.Graphics g,
                              int x,
                              int y,
                              int width,
                              int height,
                              boolean raised)
Draws a filled 3D Oval on the specified graphics context, at the specified X, Y co-ordinates.
The raised variable determines whether the shadow is raised or sunken.
Parameters:
g - the graphics context.
x - the x co-ordinate.
y - the y co-ordinate.
width - width of oval.
height - height of oval.
raised - true if the oval should be raised; false otherwise.

draw3DPolygon

public static void draw3DPolygon(java.awt.Graphics g,
                                 java.awt.Polygon p,
                                 boolean raised)
Draws a 3D Polygon on the specified graphics context, using the specified polygon points.
The raised variable determines whether the shadow is raised or sunken.
Parameters:
g - the graphics context.
raised - true if the polygon should be raised; false otherwise.

fill3DPolygon

public static void fill3DPolygon(java.awt.Graphics g,
                                 java.awt.Polygon p,
                                 boolean raised)
Draws a filled 3D Polygon on the specified graphics context, using the specified polygon points.
The raised variable determines whether the shadow is raised or sunken.
Parameters:
g - the graphics context.
raised - true if the polygon should be raised; false otherwise.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD